<?php
/**
 * Created by PhpStorm.
 * User: hcadmin
 * Date: 16/9/9
 * Time: 下午3:15
 */
namespace app\models;

use Yii;
use yii\db\ActiveRecord;
class  Globals extends ActiveRecord{

    public static function tableName(){
      return 'hcps_global';
    }
    public function getShopName(){
        $shopName=(new \yii\db\Query())->select(['value'])->from('hcps_global')->where(['key' => 'shop_name'])->scalar();
        return $shopName;
    }

}

